IPA & data frames:
Open Government Data and Beer Analytics
🏛 + 🍺
Jasmine Dumas | @jasdumas | jasdumas.github.io
August 2, 2016
The “clearinghouse” for open U.S. government data is located at data.gov. It also contains tools, and resources to conduct research, develop web and mobile applications, design data visualizations.
read.csv, read.table or even webscraped efficiently## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
ttbbeerrvest (the first dataset was copy/pasted to excel due to the limited R ecosystem of PDF parsing pacakges)library(ttbbeer)
data("beermaterials")
print(head(beermaterials))## Month Year Malt_and_malt_products Corn_and _corn_products
## 1 January 2015 316756669 60186876
## 2 February 2015 294630835 49718568
## 3 March 2015 320802302 53925263
## 4 April 2015 312758553 51063078
## 5 May 2015 333902533 59741914
## 6 June 2015 385603072 59298220
## Rice_and_rice_products Barley_and_barley_products
## 1 52438465 8492680
## 2 48975137 9355462
## 3 48710754 22213428
## 4 55895095 10015583
## 5 59210512 11478057
## 6 47366385 25372526
## Wheat_and_wheat_products Sugar_and_syrups Hops_dry Hops_extracts
## 1 1392183 72069615 1916516 298514
## 2 2145359 74431855 1775144 298894
## 3 3761816 82679762 3750830 321462
## 4 2575534 83137106 2196140 321444
## 5 3292994 81360042 2200520 345805
## 6 4491138 78767085 3011107 403948
## Other
## 1 11163548
## 2 12017223
## 3 13892190
## 4 13491920
## 5 15579095
## 6 33045174
+